
<div style = "width: 450px">
<?php echo $this->Form->create('AddScreen', array('class' => 'form-horizontal', 'id' => 'myform'));?>
	  <div class="control-group">
	    <label class="control-label">Function Name</label>
	    <div class="controls">
	      <?php echo $this->Form->input('functionName', array('label' => false , 'value' => isset($idScreen)?$idScreen: null));?>
	    </div>
	  </div>
	  <div class="control-group">
	    <label class="control-label" >Screen Name(Ja)</label>
	    <div class="controls">
	      <?php echo $this->Form->input('screenName1', array('label' => false));?>
	    </div>
	  </div>
	  <div class="control-group">
	    <label class="control-label">Screen Name(En)</label>
	    <div class="controls">
	      <?php echo $this->Form->input('screenName2', array('label' => false));?>
	    </div>
	  </div>
	  <div class="control-group">
	    <label class="control-label" >Screen Name(Vi)</label>
	    <div class="controls">
	      <?php echo $this->Form->input('screenName3', array('label' => false));?>
	    </div>
	  </div>
	  <div class="control-group">
	    <label class="control-label" >Screen Code</label>
	    <div class="controls">
	      <?php echo $this->Form->input('screenCode', array('label' => false));?>
	    </div>
	  </div>
	  <div class="modal-footer" >
	     <div align = "center">
	     <button type="submit" class="btn btn-primary">Save</button>
	     </div> 
	  </div>
<?php echo $this->Form->end();?>
</div>
<script>
// just for the demos, avoids form submit
jQuery.validator.setDefaults({
  debug: true,
  success: "valid"
});
$( "#myform" ).validate({
  rules: {
    "data[AddScreen][screenName1]": {
      required: true
    },
    "data[AddScreen][screenName2]": {
        required: true
      }
  }
});
</script>